package com.edison.demo.until;

import java.util.Random;


/**
 *  customer manager numbers and customer numbers  and any other undefine generator
 * @author edison
 */
public class CustomerNumberGenerator {

    private CustomerNumberGenerator(){
        throw new IllegalStateException("Utility class");
    }

    private static final Random RANDOM = new Random();

    public static String generateCustomerNumber() {
        // Prefix "805" or "800"
        String prefix = RANDOM.nextBoolean() ? "805" : "800";

        // Generate the remaining 7 random digits
        StringBuilder customerNumber = new StringBuilder(prefix);
        for (int i = 0; i < 7; i++) {
            customerNumber.append(RANDOM.nextInt(10));
        }

        return customerNumber.toString();
    }


}
